//保存本地
export const saveLocal = (name: string, data: any) => {
    return localStorage.setItem(name, JSON.stringify(data))
}


export const getLocal = (name: string) => {
    const data = localStorage.getItem(name)
    if (data !== null) {
        return JSON.parse(data)
    }else{
        return null
    }
}


//删除本地
export const removeLocal = (name: string) => {
    return localStorage.removeItem(name)
}